Communication apparatus, control method therefor, and storage medium

ABSTRACT

A communication apparatus, which has a normal power consumption mode and a power saving mode lower in power consumption than in the normal power consumption mode and which is connected to a network via a network interface device, communicates with a device on the network via the network interface device. The communication apparatus acquires capability information indicating a communication capability of the device, and based on acquired capability information, determines a communication mode to be used when the network interface device communicates with the device under a condition that the communication apparatus has shifted to the power saving mode, and when the communication apparatus shifts from the normal power consumption mode to the power saving mode, sets the determined communication mode as a communication mode to be used when the network interface device communicates with the external device.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a communication apparatus having anormal power consumption mode and a power saving mode and connected to anetwork via a network interface device.

2. Description of the Related Art

Heretofore, in image forming apparatuses, such as multifunctionalperipherals or single-function printers, various schemes have beenadopted to reduce power consumption. Among others, image formingapparatuses with a sleep mode (power saving mode) for consuming lesspower than in a standby state (normal power consumption mode) havebecome widespread.

In the sleep mode, power supply to the units of the image formingapparatus is stopped except to a random access memory (RAM), a networkinterface card (NIC), and an operation unit, so that power consumptionduring the sleep mode can be reduced to about 1 Watt (W) to a few W.During the sleep mode, an image forming process cannot be performedbecause during the sleep mode, power supply to the photosensitive drumand the fixing unit in the printer unit of the image forming apparatusis stopped, and also power supply to the central processing unit (CPU)and the hard disk drive (HDD) is stopped.

When a predetermined condition is met during the sleep mode, the imageforming apparatus returns from the sleep mode to the standby state. Thepredetermined condition includes, for example, that (1) a user hasoperated the operation unit of the image forming apparatus, and that (2)the NIC has received a packet that meets the return condition from thesleep mode to the standby state. Thus, power is supplied to theoperation unit or the NIC even during the sleep mode to check if anybutton is pressed on the operation unit or if the packet is received.

Packets that meet the return conditions include (1) a unicast packetaddressed to the image forming apparatus, (2) a return packet to requesta return from the sleep mode to the standby state, and (3) broadcastpackets or multicast packets of a specific protocol. In other words, thereturn packet (2) denotes a magic packet that includes a particularpattern in the packet. The broadcast packets or multicast packets of aspecific protocol (3) are search packets formatted according to aprotocol to enable another node on the network to search for the imageforming apparatus on the network.

In order to receive packets described above, the NIC of the imageforming apparatus needs to be linked to the network also when the imageforming apparatus is in the sleep mode. If the network standard isEthernet®, for example, the NIC is linked in a communication modepreviously specified or linked in a communication mode determined byusing autonegotiation defined in IEEE802.1u. The communication modementioned here includes a link speed (communication speed) and a duplexmode (full duplex or half duplex).

The NIC in some recent image forming apparatuses supports acommunication speed of 1000 Mbps (1 Gbps) in addition to theconventional speeds of 10 Mbps and 100 Mbps. However, in a communicationmode of 1000 Mbps, the power consumption of the NIC is larger than thatat 10 Mbps or 100 Mbps. Therefore, there is known a method for reducingpower consumption in the sleep mode, which causes the NIC to behave asif it does not support 1000 Mbps during the shift from the standby stateto the sleep mode and then causes the NIC to be linked back to thenetwork.

It is possible to further reduce power consumption by selecting a lowcommunication speed to suit the communication capability of the hub onthe network from among communication speeds (10 Mbps and 100 Mbps) otherthan 1000 Mbps.

For example, Japanese Patent Application Laid-Open No. 2004-243533discusses a method in which, when an image forming apparatus shifts tothe power saving mode under the condition that the apparatus isconnected to the hub, the media access control (MAC) unit of the imageforming apparatus determines a communication speed in a manner to suitthe communication capability of the hub.

Japanese Patent Application Laid-Open No. 2002-271334 describes a methodin which, when communication has not taken place in the communicationapparatus for a fixed period of time, the NIC connected to the host andthe LAN changes the communication speed set in itself to a lower speed.

However, in a communication system in which the communication apparatusis connected to a network via the network interface device,consideration has not been taken for reduction of power consumption atthe network interface device side when the communication apparatus is inthe power saving mode.

More specifically, in Japanese Patent Application Laid-Open No.2004-271334 mentioned above, since the image forming apparatus itself isdirectly connected to the network, attention has not been paid to areduction of power consumption at the network interface device, which isindependent from the image forming apparatus.

In Japanese Patent Application Laid-Open No. 2002-271334 describedabove, the NIC itself acts to reduce power consumption. However, whencommunication has not taken place in the NIC for a fixed period of time,the NIC discussed in Japanese Patent Application Laid-Open No.2002-271334 changes settings of the communication mode in the NIC, butnot in response to a command from another communication apparatus (thehost).

As described above, in a system where the communication apparatus isconnected to a network via the network interface device, powerconsumption cannot be reduced by the network interface device connectedto the communication apparatus. Unless the network interface deviceitself incorporates some mechanism to reduce power consumption, powerconsumption by the network interface device cannot be reduced even whenthe communication apparatus enters the power saving mode.

SUMMARY OF THE INVENTION

The present invention is directed to a communication apparatus capableof determining, on the communication apparatus side, a communicationmode of a network interface device under the condition that thecommunication apparatus has shifted to a power saving mode, and settingthe communication mode in the network interface device.

According to an aspect of the present invention, a communicationapparatus, which has a normal power consumption mode and a power savingmode lower in power consumption than in the normal power consumptionmode, and which is connected to a network via a network interfacedevice, includes a communication unit configured to communicate with adevice on the network via the network interface device, an acquisitionunit configured to acquire capability information indicating acommunication capability of the device, a determination unit configuredto, based on the capability information acquired by the acquisitionunit, determine a communication mode to be used when the networkinterface device communicates with the device under a condition that thecommunication apparatus has shifted to the power saving mode, and asetting unit configured to, when the communication apparatus shifts fromthe normal power consumption mode to the power saving mode, set thecommunication mode as a communication mode to be used when the networkinterface device communicates with the device.

Further features of the present invention will become apparent from thefollowing detailed description of exemplary embodiments with referenceto the attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention.

FIG. 1 is a view of a communication system according to an exemplaryembodiment of the present invention.

FIG. 2 is a block diagram illustrating a configuration of an imageforming system according to the exemplary embodiment of the presentinvention.

FIG. 3 is a software configuration diagram of an NIC and a multifunctionperipheral (MFP) according to the exemplary embodiment of the presentinvention.

FIG. 4 is a diagram illustrating a setting screen displayed on theoperation unit according to the first exemplary embodiment of thepresent invention.

FIG. 5 is a flowchart illustrating the operation of the MFP and the NIC,which is performed when the MFP is started, according to the firstexemplary embodiment of the present invention.

FIG. 6 is a flowchart illustrating the operation of the MFP and the NIC,which is performed when the MFP shifts to the sleep mode (power savingmode), according to the first exemplary embodiment of the invention.

FIG. 7 is a flowchart illustrating the operation of the MFP and the NIC,which is performed when the MFP returns from the sleep mode to thestandby state, according to the first exemplary embodiment of thepresent invention.

FIG. 8 is a flowchart illustrating the operation of the MFP and the NIC,which is performed when the MFP is in the standby state, according tothe first exemplary embodiment of the present invention.

FIG. 9 is a flowchart illustrating the operation of the MFP and the NIC,which is performed when the MFP returns from the sleep mode to thestandby state, according to a second exemplary embodiment of the presentinvention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

Various exemplary embodiments, features, and aspects of the inventionwill be described in detail below with reference to the drawings.

In a first exemplary embodiment, the operation of the MFP 100 to beperformed when the MFP 100 is started, when the MFP 100 shifts to thesleep mode, when the MFP 100 returns to the standby state, and when theMFP 100 is in the standby state (especially, link operations toEthernet®) will be described in the following.

FIG. 1 is a view of a communication system according to the firstexemplary embodiment of the present invention. In the communicationsystem illustrated in FIG. 1, the communication apparatus (MFP 100) isconnected to a hub 102 via a network interface card (NIC) 101 (networkinterface device), and the hub 102 is further connected to a local areanetwork (LAN) 103. In addition to the NIC 101, a personal computer (PC)104 and a mail server 105 are connected to the hub 102.

The hub 102 is a line concentrator for Ethernet® cables, for example,and supports three kinds of communication speeds (link speeds) of 10Mbps, 100 Mbps, and 1000 Mbps. With regard to duplex modes, the hub 102supports full duplex mode and half duplex mode at 10 Mbps and 100 Mbps,and full duplex mode at 1000 Mbps.

It is supposed that communication modes, such as a link speed and aduplex mode, are to be set at each port of the hub 102 in advance. Insetting a communication mode, autonegotiation can be previously set insuch a manner that autonegotiation can be performed instead of fixedlysetting a link speed or a duplex mode.

FIG. 2 is a diagram illustrating the configuration of an image formingsystem 200, which includes an MFP 100 and an NIC 101.

The NIC 101, which has been implemented by an intelligent type networkcard module, is a network interface device detachably connected to theMFP 100. The NIC 101 includes a CPU 201, a RAM 202, a ROM 203, a networkinterface (I/F) 204, a light emitting diode (LED) 205, an expansion I/F206, all being used as components of the NIC 101, and a system bus 207configured to interconnect those components.

The CPU 201 reads a control program stored in the ROM 203 and executesvarious control processes. For example, the CPU 201 is connected to thehub 102 via the network I/F 204 connected to the system bus 207, and isfurther connected via the hub 102 to terminals on the LAN 103 to executecommunication processes in compliance with a predetermined communicationprotocol. As a result, the CPU 201 can receive various data, such asprint data and printer control commands, sent from, for example, a printdata generating device on the LAN 103, transfer data via the expansionI/F 206 to the MFP 100, and carry out a print process in the MFP 100.

The RAM 202 is the main memory of the CPU 201 and is used as a temporarystorage area, such as the work area. The LED 205 is used as a display toshow the operating state of the NIC 101. The LED 205 uses colors orblinking patterns of LED light to show an electric connection statebetween the network I/F 204 and the hub 102 and various operatingstates, such as a communication state.

The expansion I/F 206 connects the NIC 101 and the MFP 100, and isconnected to an expansion I/F 224 on the MFP 100 side via a local cable210. The expansion I/F 206 includes a connector (not shown). The NIC 101is detachably connected to the printer MFP 100 by the connector.Further, the NIC 101 can be mounted on another MFP having a similarconfiguration.

The network I/F 204 has a capability of communication at a link speed ofany one of 10 Mbps, 100 Mbps, and 1000 Mbps and either in full duplex orhalf duplex when the MFP 100 is in the standby state. The network I/F204 is set as to communicate at a link speed of 10 Mbps or 100 Mbps andin full or half duplex when the MFP 100 is in the sleep mode. In otherwords, the network I/F 204 operates to support 10 Mbps and 100 Mbps, butdoes not support 1000 Mbps when the MFP 100 is in the sleep mode.

The MFP 100 also includes a control unit 220, an operation unit 230, ascanner 240, and a printer 250.

The control unit 220 includes a CPU 221 for the MFP 100, a RAM 222, aROM 223, an expansion I/F 224, an operation unit I/F 225, a device I/F226, and a system bus 227 to interconnect those units.

The CPU 221 reads a control program stored in the ROM 223, and executesvarious control processes. For example, the CPU 221 generates outputimage data based on print data transferred from the NIC 101 via theexpansion I/F 224, and outputs the output image data to the printer 250via the device I/F 226.

The RAM 222, which functions as the main memory of the CPU 221, is usedas a work area, for example. The RAM 222 is configured so that itsstorage capacity can be increased by connecting an optional RAM to anexpansion port (not shown).

The operation unit 230 is provided with buttons to execute operations,such as setting the operation mode of the MFP 100 and deleting printdata, and also provided with a display section, including a liquidcrystal panel and LED indicators. A communication mode can be set on theoperation unit 230.

The printer 250 is a printer utilizing a well-known printing technology,and prints image data by using an electrophotographic method (laser beammethod), inkjet method, or sublimation method (thermal transfer method).The scanner 240 generates image data by reading images on an originaldocument, and inputs data into the MFP 100.

The MFP 100 has a sleep mode in which power consumption is lower thanwhen the MFP 100 is in the standby state. When the MFP 100 is in thesleep mode, power consumption is reduced by stopping power supply to theunits other than specific units (e.g., the operation unit 230 and theexpansion I/F 224).

FIG. 3 is a software configuration diagram of the NIC 101 and the MFP100. Here, description is limited to setting of a communication mode inthe NIC 101, but it is to be noted that NIC 101 and the MFP 100 containvarious items of software other than the software described below.

Those items of software illustrated in FIG. 3 stored in the storage ofthe NIC 101 or the MFP 100, and in response to a startup of the NIC 101or the MFP 100, those items of software are read and executed by the CPU221.

A network I/F driver 302 and a communication control unit 303 areprovided on an operating system (OS) 301 on the NIC 101 side. Thenetwork I/F driver 302 controls the execution of a communication processby the network I/F 204. The communication control unit 303 sets aspecified communication mode in the network I/F driver 302 according tocontents specified by the MFP 100 side by using a method to be describedbelow.

An NIC driver 312 and a communication mode setting unit 313 are providedon an operating system (OS) 311 on the MFP 100 side. The NIC driver 312sends various commands to the NIC 101 to cause the NIC 101 to executevarious operations. The communication mode setting unit 313, by using amethod to be described later, determines a communication mode to be usedwhen the NIC 101 communicates with the hub 102, and causes the NIC 101to set the communication mode therein.

Among those items of software that run on the OS 311 in the MFP 100, theNIC driver 312 operates in the kernel space of the OS 311, whereas thecommunication mode setting unit 313 operates in the user space of the OS311.

By using an application program interface (API) of the NIC driver 312,the communication mode setting unit 313 can acquire various items ofinformation of the NIC 101 and performs various settings to the NIC 101.

The various items of information of the NIC 101 include informationabout whether the network cable is connected to the NIC 101 (whether theNIC 101 is electrically connected to the hub 102), and informationindicating the communication mode currently set in the NIC 101.

Moreover, the communication mode setting unit 313 can obtain capabilityinformation indicating the communication capability of the hub 102 fromthe NIC 101. More specifically, the communication mode setting unit 313can recognize the communication capability of the hub 102 by referringto a link-partner-ability register of the NIC 101 via the NIC driver312.

The capability information indicating the communication capability ofthe hub 102 is information, including whether settings, such as acommunication speed and a duplex mode, or autonegotiation, to which thehub 102 can respond, are set in the hub 102.

The communication mode setting storage device 314 stores informationincluding communication modes that can be used when the NIC 101communicates with the hub 102 under the condition that the MFP 100 iseither in the standby state or in the sleep mode. The MFP 100 causesinformation including communication modes determined by thecommunication mode setting unit 313 to be stored in the communicationmode setting storage device 314, and transmits a command to the NIC 101based on information stored in the communication mode setting storagedevice 314.

FIG. 4 is a diagram illustrating a screen to specify a communicationmode displayed on the operation unit 230. The communication modespecified via the setting screen in FIG. 4 is set in the NIC 101 as acommunication mode when the NIC 101 communicates with the hub 102 whenthe MFP 100 is in the standby state.

In the setting screen illustrated in FIG. 4, “ON” or “OFF” of “AUTOMATICDETECTION” can be selected. When “ON” of “AUTOMATIC DETECTION” isselected, autonegotiation takes place, so that a communication mode isdetermined and set automatically. Note that when “ON” of “AUTOMATICDETECTION” is selected, it is impossible to specify a “communicationmode” or a “type of Ethernet”.

When “OFF” of “AUTOMATIC DETECTION” is selected, autonegotiation doesnot occur. Therefore, the user needs to specify “half duplex” or “fullduplex” as “communication method”, and also needs to specify “10 Base-T”or “100 Base-TX” as the “type of Ethernet”.

Information about a communication mode set via the setting screenillustrated in FIG. 4 is stored in the communication mode settingstorage device 314. The next time the MFP 100 is supplied with power andstarted, information stored in the communication mode setting storagedevice 314 is referred to, and a communication mode indicated by theinformation is set in the NIC 101.

The operation performed when the MFP 100 is started will be describedbelow. FIG. 5 is a flowchart illustrating the operation of the MFP 100and the NIC 101 when the MFP 100 is supplied with power and started. Thesteps to the left side of the broken line in the flowchart of FIG. 5 areexecuted by the CPU 221 of the MFP 100. The steps to the right side ofthe broken line are executed by the CPU 201 of the NIC 101.

When the MFP 100 is started, in step S501, the CPU 221 reads informationindicating a communication mode previously specified via the settingscreen in FIG. 4 from the communication mode setting storage device 314.In step S502, the communication mode setting unit 313 sends an “ioctl”command to the NIC driver 312 to enable the NIC 101.

In step S503, the CPU 221 determines whether the NIC 101 is connected tothe network. Here, in addition to whether the cable of the network isattached to the network I/F 204 of the NIC 101, the CPU 221 alsodetermines whether the NIC 101 is electrically connected to the hub 102.This determination is made based on information about the networkconnection state that is acquired by the NIC driver 312 from the NIC 101in response to the “ioctl” command sent to the NIC driver 312 from thecommunication mode setting unit 313.

In step S503, when the CPU 221 determines that the NIC 101 is connectedto the hub 102 (YES in step S503), the process proceeds to step S504. Ifthe NIC 101 is not connected to the hub 102 (NO in step S503), the CPU211 waits until the NIC 101 is connected to the hub 102 (YES in stepS503). In step S504, the communication mode setting unit 313 notifies,based on information read out in step S501, the NIC driver 312 of acommunication mode when the MFP 100 is in the standby state by using an“ioctkl” command, and the NIC driver 312 sets the communication mode inthe NIC 101.

On the NIC 101 side, in step S505, the CPU 201 sets a communication modenotified from the MFP 100 as a communication mode to be used when theNIC 101 communicates with the hub 102, and establishes a link to the hub102. When the communication mode in the standby state isautonegotiation, the NIC driver 312 executes an autonegotiation process,and the hub 102 determines a communication mode to be set by the NIC 101based on applicable communication modes.

On the MFP 100 side, in step S506, the communication mode setting unit313, by using an “ioctl” command, makes inquiry to the NIC driver 312about the communication capability of the hub 102. In response to theinquiry, the NIC driver 312 makes a request to the NIC 101 forcapability information indicating the communication capability of thehub 102. On receiving this request, in step S507, the NIC 101 notifiesthe MFP 100 of the capability information of the hub 102.

More specifically, at this time, the communication mode setting unit 313refers via the NIC driver 312 to the content of the link-partner-abilityregister in the NIC 101 and obtains capability information of the hub102. It is to be noted that for a time when conducting a linkup in stepS505, the capability information of the hub 102 is obtained previouslyby having the NIC 101 communicate with the hub 102.

In step S508, the CPU 221 determines whether the capability informationof the hub 102 has been acquired successfully. If it is determined thatthe capability information of the hub 102 has been acquired (YES in stepS508), the process proceeds to step S509, where the CPU 221 determineswhether the hub 102 supports a communication speed of 10 Mbps. If thedetermination result is that the hub 102 supports the communicationspeed of 10 Mbps (YES in step S509), the process proceeds to step S510.

In step S510, the communication mode setting unit 313 determines thatthe communication mode to be used when the NIC 101 communicates with thehub 102 under the condition the MFP 100 has shifted to the sleep mode is10 Mbps. The communicating mode setting unit 313 notifies theinformation about the determined communication mode to the NIC driver312.

If the determination result in step S508 is that the capabilityinformation of the hub 102 has not been acquired (NO in step S508) or ifthe determination result in step S509 is that the hub 102 does notsupport a communication speed of 10 Mbps, the process advances to stepS511.

In step S511, the communication mode setting unit 313 determines thatthe communication mode to be used when the NIC 101 communicates with thehub 102 under the condition that the MFP 100 has shifted to the sleepmode is autonegotiation. The communication mode setting unit 313notifies the information indicating the determined communication mode tothe NIC driver 312.

As described above, when the MFP 100 is in the standby state, datacommunication can be conducted efficiently if the NIC 101 is linked tothe network at a faster communication speed out of communication speedsat which the hub 102 can operate.

However, even after the MFP 100 has shifted to the sleep mode, if thecommunication speed is kept at the same speed as in the standby mode,power consumption increases, so that the effect of reducing powerconsumption as a result of having shifted to the sleep mode cannot beobtained sufficiently. For a communication mode when the MFP 100 is inthe sleep mode, a slower one of the communication speeds at which thehub 102 can operate is determined as a communication speed when the NIC101 communicates with the hub 102 under the condition that the MFP 100has shifted to the sleep mode. On that account, power consumption on theNIC 101 side under the condition that the MFP 100 in the sleep mode canbe reduced.

Note that at this time, not only the communication speed but also aduplex mode can be taken into account. More specifically, not only acommunication mode is determined by considering a communication speed atwhich the hub 102 can operate, but also a communication mode, includinga duplex mode, can be determined, that is, by taking into account adetermination of whether the hub 102 can communicate in a half duplex ora full duplex mode. In other words, by selecting a half duplex mode or afull duplex mode according to a duplex mode in which the hub 102 canoperate, a collision can be prevented from occurring in datatransmission. Moreover, power consumption of the NIC 101 differs notonly with a communication speed but also according to whether a halfduplex or a full duplex is used, and therefore, by determining acommunication mode by considering which to use out of duplex modes thatthe hub 102 can operate, power consumption can be further reduced.

Instead of determining a communication mode by obtaining the capabilityinformation of the hub 102 from the NIC 101 when the MFP 100 shifts tothe sleep mode, by previously determining a communication mode when theMFP 100 is in the sleep mode when the MFP 100 is started, the followingcan be obtained.

If the MFP 100 repeatedly transmits and receives information with theNIC 101 when the MFP 100 shifts to the sleep mode, it takes time beforethe communication mode is changed on the NIC 101 side, and the MFP 100cannot quickly shift to the sleep mode. To address this, as describedabove, before the condition is met for the MFP 100 to shift to the sleepmode, by previously determining a communication mode, it becomespossible to quickly change the communication modes of the NIC 101 whenMFP 100 shifts to the sleep mode.

Next, the operation performed when the MFP 100 shifts to the sleep modewill be described. FIG. 6 is a flowchart illustrating the operation ofthe MFP 100 and the NIC 101 when the MFP 100 shifts to the sleep mode.The steps to the left of the broken line in the flowchart illustrated inFIG. 6 are executed by the CPU 221 of the MFP 100. The steps to theright of the broken line are executed by the CPU 201 in the NIC 101.

The MFP 100 in the standby state, in step S601, determines whether thecondition for the MFP 100 to shift to the sleep mode is met. Supposehere that this condition has been set by the user in advance, and thatit is arranged that the MFP 100 shifts to the sleep mode if the userdoes not perform any operation for a predetermined period of time, or ifa predetermined period of time elapses since the end of a printoperation.

If the determination result in step S601 is that the condition to shiftto the sleep mode is met (YES in step S601), the process proceeds tostep S602, where the MFP 100 shifts to the sleep mode. Morespecifically, power supply to the units other than specified units,e.g., the operation unit 230 and the expansion I/F 224, is stopped. Inaddition, the communication mode setting unit 313, by using an “ioctl”command, notifies the NIC driver 312 that the MFP 100 has shifted to thesleep mode. On receiving this notification, the NIC driver 312, in stepS603, instructs the NIC 101 to terminate the link to the network.

On the NIC 101 side, in step S604, when receiving a command from the NICdriver 312, the CPU 201 terminates the link to the hub 102.

On the MFP 100 side, in step S605, by using an “ioctl” command, thecommunication mode setting unit 313 notifies the NIC driver 312 of acommunication mode when the MFP 100 is in the sleep mode, and the NICdriver 312 causes the NIC 101 to set the communication mode therein.

On the NIC 101 side, in step S606, the CPU 201 sets the communicationmode notified from the MFP 100 as the communication mode to be used whenthe NIC 101 communicates with the hub 102, and establishes a link to thehub 102. If the communication mode when the MFP 100 is in the sleep modeis autonegotiation, the NIC driver 312 executes an autonegotiationprocess, and determines a communication mode for the NIC 101 to settherein based on communication modes in which the hub 102 can operate.

The communication mode when the MFP 100 is in the sleep mode can benotified to the NIC 101 at timing determined in step S510 or step S511in FIG. 5. In this case, when the MFP 100 shifts to the sleep mode, if amessage only to the effect that the MFP 100 shifts to the sleep mode issent to the NIC 101, the communication mode up to that time is changedto a communication mode when the MFP 100 is in the sleep mode, which hasbeen managed by a register in the NIC 101.

Next, the operation performed when the MFP 100 returns from the sleepmode to the standby state will be described. FIG. 7 is a flowchartillustrating the operation of the MFP 100 and the NIC 101 when the MFP100 returns from the sleep mode to the standby state. The steps to theleft of the broken line in the flowchart of FIG. 7 are executed by theCPU 221 of the MFP 100. The steps to the right of the broken line areexecuted by the CPU 201 of the NIC 101.

The MFP 100 in the sleep mode, in step S701, determines whether thecondition for the MFP 100 to return to the standby state is met. Supposehere that this condition has been set by the user in advance and it isarranged that the MFP 100 returns to the standby state if the useroperates the operation unit 230 or if a specific packet is received fromthe network.

A specific packet mentioned above is (1) a unicast packet addressed tothe MFP 100, (2) a return packet requesting a return from the sleepmode, or (3) a broadcast packet/multicast packet of a specific protocol,for example. The return packet (2) is a magic packet including aspecific pattern. The broadcast/multicast packet of a specific protocol(3) is a search packet in compliance with a protocol, which is designedfor another node on the LAN 103 to search for an MFP on the network, forexample.

In addition to the cases described above, in a case where the NIC's 101connection to the network is detected again, the MFP 100 returns to thestandby state. The MFP 100 returns to the standby state not only whenthe network cable is attached to the network I/F 204 of the NIC 101, butalso when the NIC 101 is electrically connected to the hub 102. In otherwords, under the condition that the network cable is connected to theNIC 101, when power is supplied again to the hub 102, or when the hubitself is replaced with another one, the MFP 100 returns to the standbystate.

When the result of a determination in step S701 is that the conditionfor the MFP 100 to return to the standby state is met, the processproceeds to step S702, where the CPU 221 cancels the sleep mode. Morespecifically, the CPU 221 cancels stoppage of power supply to therespective units, and resumes power supply to them. In addition, thecommunication mode setting unit 313, by using an “ioctl” command,notifies the NIC driver 312 that the MFP has shifted to the standbystate. When receiving this notification, the NIC driver 312, in stepS703, supplies the NIC 101 with a command to terminate the link to thenetwork.

On the NIC 101 side, in step S704, upon receiving the command from theNIC driver 312, the CPU 201 terminates the link to the network.

Further, on the MFP 100 side, in step S705, the communication modesetting unit 313, by using an “ioctl” command, notifies the NIC driver312 of the communication mode when the MFP 100 is in the standby state,and the NIC driver 312 causes the NIC 101 to set the communication modetherein. A communication mode when the MFP 100 is in the standby statenotified at this time is a communication mode set via the setting screenillustrated in FIG. 4.

On the NIC 101 side, in step S706, the CPU 201 sets a communication modenotified from the MFP 100 as a communication mode to be used when theNIC 101 communicates with the hub 102, and establish a link to the hub102. When a communication mode when the MFP 100 is in the standby stateis autonegotiation, the NIC driver 312 executes an autonegotiationprocess to determine a communication mode to be set by the NIC 101 basedon communication modes in which the hub 102 can operate.

The communication mode in the standby state can be stored in and managedby a register in the NIC 101 even while the MFP 100 is in the sleepmode. In this case, when the MFP 100 returns from the sleep mode to thestandby state, if a message only to the effect that the MFP 100 shiftsto the sleep mode is sent to the NIC 101, the communication mode up tothat time is changed to a communication mode when the MFP 100 is in thestandby state, which has been managed by a register in the NIC 101.

On the MFP 100 side, in step S707, the communication mode setting unit313 makes inquiry to the NIC driver 312 about the communicationcapability of the hub 102 by using an “ioctl” command. In response tothis inquiry, the NIC driver 312 requests the NIC 101 to send capabilityinformation indicating the communication capability of the hub 102. Whenreceiving this request, NIC 101, in step S708, sends the capabilityinformation of the hub 102 to the MFP 100.

More specifically, at this time, the communication setting unit 313refers via the NIC driver 312 to the content of the link-partner-abilityregister, and acquires the capability information of the hub 102.

For a time when establishing a link to the hub 102 in step S706, thecapability information of the hub 102 can be acquired previously byhaving the NIC 101 communicate with the hub 102. This acquisition of thecapability information is performed when the communication mode in thestandby state is not autonegotiation (when a specific communicationspeed and a duplex mode are specified).

In step S709, the CPU 221 determines whether the capability informationof the hub 102 has been acquired successfully. If it is determined thatthe capability information of the hub 102 has been acquired (YES in stepS709), the process proceeds to step S710, where the CPU 221 determineswhether the hub 102 supports a communication speed of 10 Mbps. If thedetermination result is that the hub 102 supports a communication speedof 10 Mbps (YES in step S710), the process proceeds to step S711.

In step S711, the communication mode setting unit 313 determines that acommunication mode to be used when the NIC 101 communicates with the hub102 under the condition that the MFP 100 has shifted to the sleep modeshould be 10 Mbps. The communication mode setting unit 313 notifiesinformation about the determined communication mode to the NIC driver312.

If it is determined in step S709 that the capability information of thehub 102 has not been acquired, or if it is determined in step S710 thatthe hub 102 does not support a communication speed of 10 Mbps, theprocess proceeds to step S712.

In step S712, the communication mode setting unit 313 determines acommunication mode to be used when the NIC 101 communicates with the hub102 under the condition that the MFP 100 has shifted to the sleep modeas autonegotiation. The communication mode setting unit 313 notifies theinformation indicating the determined communication mode to the NICdriver 312.

As described above, the communication mode setting unit 313 acquiresinformation about the capability information of the hub 102, anddetermines a communication mode in the sleep mode not only when the MFP100 has started its operation, but also when the MFP 100 has returned tothe standby state from the sleep mode. This is because the MFP's 100return from the sleep mode to the standby state sometimes results fromre-supply of power to the hub 102 or replacement of the hub 102 itself.

More specifically, when the hub 102 is replaced with another hub, thenewly installed hub may not have the same communication capability asthe previous hub. However, even when the hub 102 is changed, by checkingthe communication capability of the hub 102 again, it is possible torespond to the changing situation. This can be said of a case where evenif the hub 102 is not changed, the communication settings of the hub 102are changed and power is applied again to the hub 102.

Next, the operation of the MFP 100 in the standby state will bedescribed. FIG. 8 is a flowchart illustrating the operation of the MFP100 and the NIC 101 when the MFP 100 is in the standby state.

In step S801, the MFP 100 in the standby state determines whether theNIC 101 is connected to a network. More specifically, not only is itdetermined whether the network cable is attached to the network I/F 204of the NIC 101, but it is also determined whether the NIC 101 iselectrically connected to the hub 102.

If the determination result in step S801 is that the NIC 101 isconnected to the network (YES in step S801), the process is finished. Ifit is determined that the NIC 101 is not connected to the network (NO instep S801), the process proceeds to step S802.

In step S802, the MFP 100 determines whether the NIC 101 is connected tothe network anew. Here again, not only is it determined whether thenetwork cable is attached to the network I/F 204 of the NIC 101, but itis also determined whether the NIC 101 is electrically connected to thehub 102.

If the determination result in step S802 is that the NIC 101 has beenconnected to the network (YES in step S802), the process advances tostep S504 in FIG. 5. In other words, when the MFP 100 is in the standbystate and is connected anew to the network, the MFP 100, just as whenthe MFP 100 is started, causes the NIC 101 to establish a link to thenetwork in the communication mode in the standby state, and alsodetermines a communication mode in the sleep mode.

As described above, the communication mode setting unit 313 againacquires the capability information of the hub 102 and determines acommunication mode in the sleep mode not only when the MFP 100 isstarted, but also when the MFP 100 is in the standby state and isconnected anew to the network. This is because the communicationcapability of the newly connected hub 102 is sometimes different fromthat of the old hub.

In other words, when the hub 102 is replaced with another hub, becausethe newly installed hub 102 may not have the same communicationcapability as that of the old hub, if the communication capability ofthe hub 102 is checked again and the interface devices and settings arematched, it is possible to use the newly installed hub. This can be saidof a case where the hub 102 has not been changed, but communicationsettings of the hub 102 are changed and power is again supplied to thehub 102.

A second exemplary embodiment of the present invention will next bedescribed. The hardware configuration and the software configuration ofthe MFP 100 and the NIC 101 in the present exemplary embodiment aresimilar to those in the previous exemplary embodiment, and therefore,their descriptions are not repeated here. The configuration of thecommunication system is also similar to that of the previous exemplaryembodiment.

In the present exemplary embodiment, when the MFP 100 returns from thesleep mode to the standby state, the CPU 221 determines the factor forreturn, and, according to whether the factor for return is a specificfactor or not, again acquires capability information of the hub 102 andagain determines a communication mode in the sleep mode.

FIG. 9 is a flowchart illustrating the operation of the MFP 100 and theNIC 101 performed when the MFP 100 returns from the sleep mode to thestandby state. The flowchart in FIG. 9 corresponds to the flowchart inFIG. 7, except step S901 added in FIG. 9. The operations from step S701to step S712 are the same and, therefore, their descriptions are notrepeated herein.

In step S705, the communication mode setting unit 313 notifies the NICdriver 312 of a communication mode in the standby state by using an“ioctl” command, and causes the NIC 101 to set the communication modetherein, and after this, the process advances to step S901.

In step S901, the CPU 221 determines whether the factor for the MFP 100to return from the sleep mode to the standby state is a specific factor.The specific factor here denotes that the NIC 101 is connected to thenetwork. In other words, in step S901, the CPU 221 determines whetherthe MFP 100 returns as a result of the NIC 101 being connected to thenetwork. Also in this determination process, not only is it determinedwhether the network cable is attached to the network I/F 204 of the NIC101, but it is also determined whether the NIC 101 is electricallyconnected to the hub 102.

If the determination result in step S901 is that the factor for returnis the NIC 101 is connected to the network (YES in step S901), theprocess proceeds to step S707, where the CPU 221 acquires capabilityinformation of the hub 102, and determines a communication mode in thesleep state. If the determination result in step S901 is that the factorfor return is not that the NIC 101 is connected to the network (NO instep S901), the process is terminated.

As described above, in the present exemplary embodiment, when the MFP100 returns from the sleep mode to the standby state, it is not routinepractice to acquire capability information of the hub 102 and determinea communication mode in the sleep mode, but whether to take these stepsis determined according to the situation. If the factor for return isthat the user operates the operation unit 230 or that a specific packetmentioned above is received from the network, the communicationcapability of the hub 102 is considered not changed. In other words, ifit is apparent that the communication capability of the hub 102 has notchanged, by omitting the acquisition of the hub 102 capabilityinformation or the determination of communication mode, the load onprocessing in the MFP 100 can be reduced.

The present invention can take various forms of exemplary embodiments,such as a system, apparatus, method, program and storage medium(recording medium), for example. More specifically, this invention canbe applied to a system, which includes a number of devices, or appliedto a device formed of a single unit.

According to the present invention, a software program that implementsthe functions of the exemplary embodiment described above (a programcorresponding to the flowchart in the embodiment) is supplied directlyor remotely from an external device to a system or apparatus. In somecases, the functions of the present invention can be implemented as thecomputer of the system or apparatus reads and executes the program codesupplied.

Therefore, since the functions of an exemplary embodiment of the presentinvention are implemented by a computer, the program code itself,installed in the computer, also implements the present invention. Inother words, the present invention covers a computer program itself,configured to implement the functions of the embodiment of the presentinvention.

In this case, so long as the functions of the program are included, thesoftware program can be in any form, such as object code, a programexecutable by the interpreter, or script data supplied to the OS.

Recording media that can be used to supply the program include, forexample, a floppy disk, hard disk, optical disk, magneto-optic disk, MO,CD-ROM, CD-R, CD-RW, magnetic tape, nonvolatile memory card, ROM, andDVD (DVD-ROM, DVD-R).

As for a program supply method, the program of the present invention canbe supplied by downloading the program into a recording medium, such asa hard disk, from a web site on the Internet by using a browser of aclient computer. In other words, a computer program of each exemplaryembodiment of the present invention can be obtained from the web site ofa download source site by connecting to the site, or by downloading acompressed file, which includes an automatic installation function. Theprogram of an exemplary embodiment of the present invention can besupplied by dividing the program code constituting the program intoplurality of files and downloading the files from different websites. Inother words, a World Wide Web (WWW) server that supplies a plurality ofusers with the program files that implement the functions of anexemplary embodiment of the present invention by the computer is alsocovered by the present invention.

The program of an exemplary embodiment of the present invention can besupplied to users by encrypting and storing the program on acomputer-readable recording medium, such as a CD-ROM. The users who meetcertain requirements are permitted to download decryption keyinformation from a website on the Internet. Then, the users can decryptthe encrypted program by using the key information, and execute theprogram on the computer.

Thus, the above-mentioned functions of the exemplary embodiments areimplemented by executing the program on the computer. Furthermore,according to commands of the program, the OS running on the computerperforms all or part of the processes, thus implementing the functionsof the embodiments.

Moreover, after the program read from the recording medium is written toa function expansion board inserted into the computer or to a memoryprovided in a function expansion unit connected to the computer, theabove-mentioned functions of the embodiments are further implemented. Inother words, in response to commands from the program, the CPU or thelike mounted on the function expansion board or the function expansionunit carries out all or part of the processes to execute the functionsof the embodiments of the present invention.

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all modifications, equivalent structures, and functions. Thisapplication claims priority from Japanese Patent Application No.2008-086956 filed Mar. 28, 2008, which is hereby incorporated byreference herein in its entirety.

1. A communication apparatus having a normal power consumption mode and a power saving mode lower in power consumption than in the normal power consumption mode, the communication apparatus comprising: a communication unit configured to connect to a network via a network interface device and communicate with a device on the network; an acquisition unit configured to acquire, from the network interface device, capability information indicating a communication capability of the device; a determination unit configured to, based on the capability information acquired by the acquisition unit, determine a communication mode to be used when the network interface device communicates with the device under a condition that the communication apparatus has shifted to the power saving mode; and a setting unit configured to, when the communication apparatus shifts from the normal power consumption mode to the power saving mode, set the communication mode determined by the determination unit as a communication mode to be used when the network interface device communicates with the device, wherein the determination unit is configured to determine a communication speed to be used when the network interface device communicates with the external device under a condition that the communication apparatus has shifted to the power saving mode, wherein the determination unit is configured to determine a lower speed from a plurality of communication speeds, which the external device can operate, as the communication speeds, which the external device can operate, as the communication speed to be used when the network interface device communicates with the device under a condition that the communication apparatus has shifted to the power saving mode.
 2. The communication apparatus according to claim 1, wherein the acquisition unit is configured to acquire, from the network interface device, the capability information, which has been previously acquired by the network interface device, from the device.
 3. The communication apparatus according to claim 1, wherein the acquisition unit is configured to acquire the capability information when the communication apparatus is started.
 4. The communication apparatus according to claim 1, wherein the acquisition unit is configured to acquire the capability information when the communication apparatus shifts from the power saving mode to the normal power consumption mode.
 5. The communication apparatus according to claim 4, further comprising a detection unit configured to detect a factor for shift when the communication apparatus shifts from the power saving mode to the normal power consumption mode, wherein the acquisition unit is configured to acquire the capability information when the factor is a specific factor.
 6. The communication apparatus according to claim 5, wherein the specific factor is that the network interface device is electrically connected to the device.
 7. The communication apparatus according to claim 1, further comprising a detection unit configured to detect that the network interface device is electrically connected to the external device, wherein the acquisition unit is configured to acquire the capability information in response to the detection unit detecting that the network interface device is electrically connected to the device.
 8. The communication apparatus according to claim 1, wherein, when the communication apparatus shifts from the normal power consumption mode to the power saving mode, the setting unit is configured to set the communication mode, which is determined by the determination unit before the communication apparatus shifts to the power saving mode, as the communication mode to be used when the network interface device communicates with the external device.
 9. The communication apparatus according to claim 1, wherein, when the acquisition unit has not acquired the capability information, the setting unit is configured to make a setting so that the communication mode to be used when the network interface device communicates with the external device is determined by using autonegotiation.
 10. The communication apparatus according to claim 1, wherein the device includes a hub.
 11. A method for controlling a communication apparatus having a normal power consumption mode and a power saving mode lower in power consumption than in the normal power consumption mode, the method comprising: communicating with a device on a network connected via a network interface device; acquiring, from the network interface device, capability information indicating a communication capability of the device; determining, based on the acquired capability information, a communication mode to be used when the network interface device communicates with the device under a condition that the communication apparatus has shifted to the power saving mode; and setting, when the communication apparatus shifts from the normal power consumption mode to the power saving mode, the determined communication mode as a communication mode to be used when the network interface device communicates with the device, wherein determining a communication speed to be used when the network interface device communicates with the external device under a condition that the communication apparatus has shifted to the power saving mode, wherein determining a lower speed from a plurality of communication speeds, which the external device can operate, as the communication speed to be used when the network interface device communicates with the device under a condition that the communication apparatus has shifted to the power saving mode.
 12. A non-transitory computer-readable storage medium storing a program for causing a computer to execute a process, the process comprising: communicating with a device on a network connected via a network interface device; acquiring, from the network interface device, capability information indicating a communication capability of the device; determining a communication mode to be used when the network interface device communicates with the external device under a condition that the communication apparatus has shifted to the power saving mode based on the acquired capability information; and setting the determined communication mode as a communication mode to be used when the network interface device communicates with the device when the communication apparatus shifts from the normal power consumption mode to the power saving mode, wherein determining a communication speed to be used when the network interface device communicates with the external device under a condition that the communication apparatus has shifted to the power saving mode, wherein determining a lower speed from a plurality of communication speeds, which the external device can operate, as the communication speed to be used when the network interface device communicates with the device under a condition that the communication apparatus has shifted to the power saving mode. 